import { ElNotification } from 'element-plus';

export default function useNotificationHook() {
	const openNotifation = ({
		type = 'info',
		message,
		description,
		position = 'top-right',
	}: {
		type?: 'info' | 'success' | 'error' | 'warning';
		message: string;
		description?: string;
		position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
	}) => {
		console.log('openNotifation', message);
		ElNotification({
			type,
			title: message,
			message: description,
			position,
		});
	};

	return {
		openNotifation,
	};
}
